package dxn.nl.file.client.model.dto;

import lombok.Data;

import java.util.Comparator;
import java.util.List;

@Data
public class CsExportExcelSheetHeadDto {
    private final String defaultSheetName = "sheet1";
    private List<CsExportExcelHeadDto> headDtoList;
    private boolean hasTitle = true;

    public void sortHead()
    {
        if(headDtoList !=null && !headDtoList.isEmpty())
        {
            headDtoList.sort(Comparator.comparing(CsExportExcelHeadDto::getOrder));
        }
    }
}
